import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 找出数组排序后的下标
 *
 * @USER: Administrator
 * @DATE: 2024/10/5 下午7:03
 * @VERSION: 1.0.0
 */
public class LC2089 {
    public static void main(String[] args) {

    }

    public List<Integer> targetIndices(int[] nums, int target) {
        List<Integer> res = new ArrayList<>();
        Arrays.sort(nums);
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] == target) {
                res.add(i);
            }
        }
        return res;
    }

}
